package com.tdkj.service.information.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.tdkj.dao.information.IBeanBaseInfoDao;
import com.tdkj.model.information.BeanBaseInfo;
import com.tdkj.service.BaseService;
import com.tdkj.service.information.IBeanExpertArticleService;
@Component("expertArticleService")
public class BeanExpertArticleImpl extends BaseService implements IBeanExpertArticleService{
	private IBeanBaseInfoDao baseInfoDao;
	public IBeanBaseInfoDao getBaseInfoDao() {
		return baseInfoDao;
	}
	@Resource
	public void setBaseInfoDao(IBeanBaseInfoDao baseInfoDao) {
		this.baseInfoDao = baseInfoDao;
	}

	@Override
	public void updateStatus(Long id,String type) {
		// TODO Auto-generated method stub
		BeanBaseInfo bean=baseInfoDao.findById(id, BeanBaseInfo.class);
		if(type.equals("0")){bean.setStatus("未审核");}
		if(type.equals("1")){bean.setStatus("以审核");}
		baseInfoDao.merge(bean);
	}
}
